CFLAGS += -Wall -I./
LDFLAGS += `pkg-config --libs --cflags enesim`

SOURCES = $(shell echo */*.c)
BINARIES = $(SOURCES:.c=)

all: $(BINARIES)

clean:
	rm -f $(BINARIES)

run: all clean_png
	@for b in $(BINARIES) ; do echo "[-] running $$b"; ./$$b; done && echo "[*] OK"

.c:
	$(CC) $< -o $@ $(CFLAGS) $(LDFLAGS)

clean_png:
	rm -f *.png
